<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>农产品质量安全追溯系统 - 特色园区</title>
<link rel="stylesheet" href="${path }/cms/css/public.css"/>
<link rel="stylesheet" href="${path }/cms/css/CharacteristicPark.css"/>
<script type="text/javascript" src="${path }/cms/js/jquery-1.8.3.min.js"></script>
</head>
<body>
<%@ include file="/WEB-INF/cms/header.jsp" %>

<div class="yqTopImgText">
    <div>
        <img src="${path }/cms/images/yqpic1.png" alt="">
    </div>
    <div class="yqTopImgTextRight">
        <div>
            <h2>特色园区</h2>
            <p>Characteristic park</p>
        </div>
        <div>
            <p> 基于多终端构建前后端一体化的园企互动服务体系打通园区管理与企业线_上互通渠道，提升企业满意度建立需求受理响应机制,确保服务品质</p>
            <p> 专注智慧园区信息化领域多年
                <br>
                拥有专业的管理咨询与研发团队
                <br>
                通过融合一流园区先进管理理念与信息化实践经验帮助园区客户快速构建现代化智慧运营体系</p>
        </div>
    </div>
</div>

<div class="imgfontList" id="parklist">
</div>

<div class="pageBox">
    <div class="counter" id="pageCounter"></div>
    <button class="paginate left" id="pagePrev"><i></i><i></i></button>
    <button class="paginate right" id="pageNext"><i></i><i></i></button>
</div>

<%@ include file="/WEB-INF/cms/footer.jsp" %>
<script type="text/javascript">
var imgpath = '${filepath}/farm_img/';
var pagePrev, pageNext, pageCounter, pageNo=1, pageCount=10000;
$(function(){
	pagePrev = $('#pagePrev');
	pagePrev.click(function(){
		if(pageNo<=1){
			pageNo = 1;
		}else{
			pageNo--;
		}
		loadPage(pageNo);
	});
	pageNext = $('#pageNext');
	pageNext.click(function(){
		if(pageNo>=pageCount){
			pageNo = pageCount;
		}else{
			pageNo++;
		}
		loadPage(pageNo);
	});
	pageCounter = $('#pageCounter');
	loadPage(1);
	
});
function loadPage(pageNo){
	$.get("${path}/c/listPark.json?page="+pageNo,function(page){
		pageNo = page.pageNo;
		pageCount = page.totalPage;
		pageCounter.html(pageNo+" / "+pageCount);
		pagePrev[0].setAttribute('data-state', pageNo<=1 ? 'disabled' : '');
		pageNext[0].setAttribute('data-state', pageNo>=pageCount ? 'disabled' : '');
		
		var list = page.rows;
		var parklist = $('#parklist');
		parklist.empty();
		$.each(list, function(i, d){
			var str = '<div> <div class="hoverScale"> <a href="${path}/c/parkDetail.do?id='+d.parkid+'"> <img src="'+(d.logoUrl ? imgpath+d.logoUrl : '')+'" alt="" onerror="this.src=\'${path}/cms/def/park.png\'"/> </a>'
				+' </div> <div> <a href="${path}/c/parkDetail.do?id='+d.parkid+'"> <h3>'+d.parkName+'</h3> </a> <p>'+d.remark+'</p> </div> </div>';
			parklist.append(str);
		});
		
	});
	
}

</script>
</body>
</html>